var config = require("./webpack.config.js");
var webpack = require("webpack")
var webpackDevServer=require("webpack-dev-server")
//config.entry.unshift("webpack-dev-server/client?http://localhost:3000", "webpack/hot/dev-server");
//config.entry.unshift("webpack-dev-server/client?http://192.168.0.102:3000", "webpack/hot/dev-server");
config.entry.unshift("webpack-dev-server/client?http://172.25.184.1:3000", "webpack/hot/dev-server");
var compiler = webpack(config);

var server = new webpackDevServer(compiler, {
  contentBase: "web",
  hot: true,
  inline: true,
  historyApiFallback: true,
  proxy: {
        '/App*/*': {
            target: 'http://mordencoal.56kuaiche.com/',
            // port: "80",
            secure: false
        },
        // '/recommendsResourcePeople/*': {
        //     target: 'http://120.55.125.236:8055/',
        //     // port: "80",
        //     secure: false
        // },
        // '/rewardInfo/*': {
        //     target: 'http://120.55.125.236:8055/',
        //     // port: "80",
        //     secure: false
        // },
        // '/rewardApplyLog/*': {
        //     target: 'http://120.55.125.236:8055/',
        //     // port: "80",
        //     secure: false
        // },
        // '/recommendsResource/*': {
        //     target: 'http://120.55.125.236:8055/',
        //     // port: "80",
        //     secure: false
        // },
        // '/recommendsUnit/*':{
        //   target: 'http://120.55.125.236:8055/',
        //   // port: "80",
        //   secure: false
        // }

    }

});

server.listen(3000);
